<?php
require_once("lib/db_connection.php");
$province_id = $_GET['province'];
$result_municipality = mysql_query("select * from lookup_municipality where province_id='" . $province_id . "'");
$str_value = "";


while($row_municipality = mysql_fetch_array($result_municipality))
{
	$str_value=$str_value."Array(\"$row_municipality[municipality]\",\"$row_municipality[id]\")".",";
}


$str_value=substr($str_value,0,(strLen($str_value)-1)); // Removing the last char , from the string
echo "new Array($str_value)";
?>